int is_upper(char c)
{
	return c >= 'A' && c <= 'Z';
}

int is_lower(char c)
{
	return c >= 'a' && c <= 'z';
}

char to_lower(char c)
{
	if (is_upper(c))
		return c + ('a' - 'A');
	return c;
}

char to_upper(char c)
{
	if (is_lower(c))
		return c + ('A' - 'a');
	return c;
}

int is_digit(char c)
{
	return c >= '0' && c <= '9';
}

int to_number(char c)
{
	if (is_digit(c))
		return c - '0';
	return 0;
}
